
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type LangCodeRequest struct {

	TypeId string `json:"type_id" form:"type_id"`

	Code string `json:"code" form:"code"`

	Remarks string `json:"remarks" form:"remarks"`

	LangExplain string `json:"lang_explain" form:"lang_explain"`

	IsAdmin string `json:"is_admin" form:"is_admin"`

}

func (r *LangCodeRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *LangCodeRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"type_id": "required",

		"code": "required",

		"remarks": "required",

		"lang_explain": "required",

		"is_admin": "required",

	}
}

func (r *LangCodeRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LangCodeRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LangCodeRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
